<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/23
  Time: 13:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加学生</title>
    <style>

        body {
            margin: 0;
        }

        h2 {
            text-align: center;
            width: 1000px;
            margin: auto;
            padding-top: 40px;
            padding-bottom: 40px;
        }

        h2 > a {
            float: right;
            font-size: 13px;
        }

        table {
            margin: auto;
            border-collapse: collapse;
        }

        th {
            border: 1px solid black;
            padding: 14px 42px;
        }
    </style>
</head>
<body>
<h2>添加学生信息</h2>
<form action="/student/addStudent" method="post">
    <table>
        <tr>
            <th>姓名：</th>
            <th><input name="name" type="text"></th>
        </tr>
        <tr>
            <th>性别:</th>
            <th>
                <input name="gender" checked="checked" value="男" type="radio">男
                <input name="gender" value="女" type="radio">女
            </th>

        </tr>
        <tr>
            <th>年龄:</th>
            <th><input name="age" type="text"></th>
        </tr>
        <tr>
            <th>年级:</th>
            <th>
                <select name="grade">
                    <option value="学士后">学士后</option>
                    <option value="高中">高中</option>
                    <option value="小学">小学</option>
                    <option value="中学">中学</option>
                </select>
            </th>

        </tr>
        <tr>
            <th>自我介绍:</th>
            <th><textarea name="introduce"></textarea></th>
        </tr>
        <tr>
            <th>
                <input type="submit" value="提交">
            </th>

        </tr>
    </table>
</form>
</body>
<script type="text/javascript">
  var code = ${returnDTO == null ? 200 : returnDTO.code}
   window.onload=function(){
      if(code!=200){
        alert("${returnDTO.msg}");
      }
   };
</script>
</html>
